package org.goodprinciples.oracolo.model;

import java.io.Serializable;
import java.util.Objects;

/**
 *
 * @author Francesco Conte
 */
public class PropertyDescription extends OracoloBean<PropertyDescription> {
    
    private PropertyDescriptionId id = null;
    private String description = null;
    
    public PropertyDescription() {}

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public PropertyDescriptionId getId() {
        return id;
    }

    public void setId(PropertyDescriptionId id) {
        this.id = id;
    }

    public boolean equals(java.lang.Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final PropertyDescription other = (PropertyDescription) obj;
        if (!Objects.equals(this.id, other.id)) {
            return false;
        }
        return true;
    }

    public int hashCode() {
        int hash = 7;
        hash = 97 * hash + Objects.hashCode(this.id);
        return hash;
    }

    public String toString() {
        return "PropertyDescription{" + "id=" + id + ", description=" + description + '}';
    }
    
    public static class PropertyDescriptionId implements Serializable {
        
        private Property property = null;
        private Language language = null;
        
        public PropertyDescriptionId() {}

        public Language getLanguage() {
            return language;
        }

        public void setLanguage(Language language) {
            this.language = language;
        }

        public Property getProperty() {
            return property;
        }

        public void setProperty(Property property) {
            this.property = property;
        }

        public boolean equals(java.lang.Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final PropertyDescriptionId other = (PropertyDescriptionId) obj;
            if (!Objects.equals(this.property, other.property)) {
                return false;
            }
            if (!Objects.equals(this.language, other.language)) {
                return false;
            }
            return true;
        }

        public int hashCode() {
            int hash = 7;
            hash = 97 * hash + Objects.hashCode(this.property);
            hash = 97 * hash + Objects.hashCode(this.language);
            return hash;
        }

        public String toString() {
            return "PropertyDescriptionId{" + "property=" + property + ", language=" + language + '}';
        }
        
    }
    
}
